package com.eshop.base.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户积分流水查询
 * </p>
 *
 * @author raohj
 * @since 2025-05-13
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("user_points")
@ApiModel(value = "UserPoints对象", description = "用户积分流水查询")
public class UserPoints implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "points_id", type = IdType.AUTO)
    private Long pointsId;

    /**
     * 关联user.user_id
     */
    @TableField("user_id")
    @ApiModelProperty("关联user.user_id")
    private Long userId;

    /**
     * 变动值（+/-）
     */
    @TableField("points")
    @ApiModelProperty("变动值（+/-）")
    private Integer points;

    /**
     * 类型（1=购物,2=签到,3=兑换）
     */
    @TableField("type")
    @ApiModelProperty("类型（1=购物,2=签到,3=兑换）")
    private Byte type;

    /**
     * 描述（如“订单A奖励”）
     */
    @TableField("description")
    @ApiModelProperty("描述（如“订单A奖励”）")
    private String description;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;
}
